#region Usings
using BK.BaseEntities;
using Lib.Data.ORM.Entity;
using Lib.Data.ORM.EntityManagement;
#endregion

namespace BK.Entities
{
	[MappedEntity(TableName = "Currencies")]
	public class CurrencyEntity : BaseBkEntity
	{
		#region Readonly & Static Fields
		private readonly IdentifierInt _userId;
		#endregion

		#region C'tors
		public CurrencyEntity()
		{
			_userId = new IdentifierInt();
		}
		#endregion

		#region Instance Properties
		[MappedKey(IsPrimaryKey = true, IsIdentity = true, ValuePropertyName = "Id.Value")]
		public override IdentifierInt Id
		{
			get { return base.Id; }
		}

		[MappedProperty]
		public string Description { get; set; }

		[MappedProperty]
		public string Name { get; set; }

		[MappedProperty]
		public string ShortName { get; set; }

		[MappedKey(IsForeignKey = true, ValuePropertyName = "UserId.Value")]
		public IdentifierInt UserId
		{
			get { return _userId; }
		}
		#endregion
	}
}